package com.ruoyi.audit.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单审核对象 audit
 *
 * @author zjh
 * @date 2022-04-25
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Audit extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private String materialName;
    /**
     * 订单审核主键
     */
    private Long auditId;
    /**
     * 订单主键
     */
    @Excel(name = "订单主键")
    private Long orderId;
    /**
     * 公司主键
     */
    @Excel(name = "公司主键")
    private Long companyId;
    /**
     * 订单类型 0 采购订单   1  销售订单
     */
    @Excel(name = "订单类型 0 采购订单   1  销售订单")
    private String orderType;
    /**
     * 订单审核状态
     */
    @Excel(name = "订单审核状态")
    private String auditStatus;
    /**
     * 订单审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "订单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date auditTime;
    /**
     * 订单创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "订单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date createTime;
    /**
     * 审核人
     */
    @Excel(name = "审核人")
    private String auditBy;
    /**
     * 订单审核备注
     */
    @Excel(name = "订单审核备注")
    private String auditRemark;
    /**
     * 业务员
     */
    @Excel(name = "业务员")
    private String userName;
    /**
     * 业务员主键
     */
    @Excel(name = "业务员主键")
    private Long userId;
    /**
     * 供应商/顾客
     */
    @Excel(name = "供应商/顾客")
    private String deptName;
    /**
     * 供应商/顾客主键
     */
    @Excel(name = "供应商/顾客主键")
    private Long supplierId;
    private String value;
    /**
     * 订单金额
     */
    @Excel(name = "订单金额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal amount;
    /**
     * 订单金额
     */
    @Excel(name = "订单金额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxAmount;
    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderNum;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getAuditId() {
        return auditId;
    }

    public void setAuditId(Long auditId) {
        this.auditId = auditId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public String getAuditBy() {
        return auditBy;
    }

    public void setAuditBy(String auditBy) {
        this.auditBy = auditBy;
    }

    public String getAuditRemark() {
        return auditRemark;
    }

    public void setAuditRemark(String auditRemark) {
        this.auditRemark = auditRemark;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("auditId", getAuditId())
                .append("orderId", getOrderId())
                .append("companyId", getCompanyId())
                .append("orderType", getOrderType())
                .append("auditStatus", getAuditStatus())
                .append("auditTime", getAuditTime())
                .append("auditBy", getAuditBy())
                .append("auditRemark", getAuditRemark())
                .append("userName", getUserName())
                .append("deptName", getDeptName())
                .append("createTime", getCreateTime())
                .append("taxAmount", getTaxAmount())
                .toString();
    }
}
